package hhhh;

import java.util.Scanner;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class N11 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String name;
        int password;

        String newPsd ;
        for (int i = 0; i < 6 ; i++) {
            System.out.println("请输入用户名：");
            name = sc.next();
            System.out.println("请输入密码：");
            password = sc.nextInt();

        if (!name.equals("admin")&&password!=123456){
            System.out.println("密码和名有误！请重新输入：");

        }
        else if(name.equals("admin")&&password==123456){
            System.out.println("请输入新密码：");
            newPsd = sc.next();
            System.out.println("新密码为："+newPsd);
            break;
        }

        }
    }
}
